/**
 * ----------------------------------------------------------------------------
 * Copyright Jens Konopka
 * 
 * Alle Rechte vorbehalten.
 * Licence: Apache 2.0
 * ----------------------------------------------------------------------------
 *
 * created on 06.03.2012 by jk
 */
package de.sql.toolkit.exporter;

import java.io.File;

import de.sql.toolkit.generator.CSharpGetSetMethodGenerator;
import de.sql.toolkit.generator.CSharpModelFieldsGenerator;
import de.sql.toolkit.generator.CSharpModelGenerator;
import de.sql.toolkit.generator.IGenerator;
import de.sql.toolkit.model.Table;

/**
 * @author jk
 * 
 */
public class CSharpModelSourceClassExporter extends JvModelSourceClassExporter {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1292735833964595008L;

	/**
	 * @param dstPath
	 * @param schema
	 * @param namespace
	 */
	public CSharpModelSourceClassExporter(File dstPath, String schema, final String namespace) {
		super(dstPath, schema, namespace);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see de.sql.toolkit.exporter.JvModelSourceClassExporter#initWriter(de.sql.toolkit.model.Table)
	 */
	@Override
	protected IGenerator initWriter(Table table) {
		final CSharpModelGenerator writer = new CSharpModelGenerator(getDstPath(), table, getNamespace());
		writer.add(new CSharpModelFieldsGenerator(getDstPath(), table));
		writer.add(new CSharpGetSetMethodGenerator(getDstPath(), table));
		return writer;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see de.sql.toolkit.exporter.JvModelSourceClassExporter#getExtension()
	 */
	@Override
	protected String getExtension() {
		return "cs";
	}

}
